using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using Eamon.MeituanDotnetSDK.api.common.request;
using Eamon.MeituanDotnetSDK.attribute;

namespace Eamon.MeituanDotnetSDK.model.ddzh.tuangou.tuangouReceiptQuerylistbydate
{
    /// <summary>
    /// 验券记录
    /// </summary>
    [ApiMeta(
        Path = "/ddzh/tuangou/receipt/querylistbydate",
        BusinessId = 58,
        ApiVersion = "10022",
        ApiName = "tuangou_receipt_querylistbydate",
        NeedAuth = true
    )]
    public class TuangouReceiptQuerylistbydateRequest : MeituanRequest<TuangouReceiptQuerylistbydateResponse>
    {
        /// <summary>
        /// 日期（如2016-01-01)
        /// </summary>
        [Required(ErrorMessage = "date不能为空")]
        [JsonPropertyName("date")]
        public string Date { get; set; }

        /// <summary>
        /// 业务类型：0-普通团购 ，205-次卡，203-拼团
        /// </summary>
        [JsonPropertyName("bizType")]
        public int? BizType { get; set; }

        /// <summary>
        /// 查询起始位置，从0开始
        /// </summary>
        [Required(ErrorMessage = "offset不能为空")]
        [JsonPropertyName("offset")]
        public int? Offset { get; set; }

        /// <summary>
        /// 0：验券记录  ；1  撤销验券记录
        /// </summary>
        [Required(ErrorMessage = "type不能为空")]
        [JsonPropertyName("type")]
        public int? Type { get; set; }

        /// <summary>
        /// 查询条数，最大300
        /// </summary>
        [Required(ErrorMessage = "limit不能为空")]
        [JsonPropertyName("limit")]
        public int? Limit { get; set; }

        public override string ToString()
        {
            return $"TuangouReceiptQuerylistbydateRequest{{Date={Date}, BizType={BizType}, Offset={Offset}, Type={Type}, Limit={Limit}}}";
        }
    }
}
